
package tests.laurens.images;

import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.HeadlessException;


public class DetectDualMonitors {
	public static void main(String[] argv) throws Exception {

		GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
		int numScreens = 0;
		try {
			GraphicsDevice[] gs = ge.getScreenDevices();

			numScreens = gs.length;
		} catch(HeadlessException e) {

		}
		System.out.println(numScreens);
	}
}
